//
//  SubmitSuccessViewController.swift
//  FeastBooking
//
//  Created by Imon on 2017/10/22.
//  Copyright © 2017年 Imon. All rights reserved.
//

import UIKit

class SubmitSuccessViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        self.navigationItem.title = LanguageHelper.getString(key: "SUBMIT_SUCCESS")
        
        let leftBt = UIButton()
        leftBt.contentHorizontalAlignment = .left
        leftBt.setTitle("", for: .normal)
        leftBt.sizeToFit()
        self.navigationItem.leftBarButtonItem = UIBarButtonItem.init(customView: leftBt)
        
        let rightBt = UIButton()
        rightBt.contentHorizontalAlignment = .right
        rightBt.setTitle(LanguageHelper.getString(key: "DONE"), for: .normal)
        rightBt.setTitleColor(doneItemButtonColor, for: .normal)
        rightBt.addTarget(self, action: #selector(done(_:)), for: .touchUpInside)
        rightBt.sizeToFit()
        self.navigationItem.rightBarButtonItem = UIBarButtonItem.init(customView: rightBt)
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    
    func done(_ sender: UIBarButtonItem) {
        self.navigationController?.popToRootViewController(animated: true)
    }

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
